cmake_minimum_required(VERSION 3.15)
project(test)

set(CMAKE_CXX_STANDARD 11)

add_definitions("-Wall -g -Wno-unused-variable -Wno-unused-function")
add_subdirectory(libraries/opus)

if (${DEV_PLATFORM} STREQUAL "LINUX")
    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/linux_platform/inc)
    add_subdirectory(linux_platform)
    target_link_libraries(middle PUBLIC opus)
    target_include_directories(middle PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libraries/opus/include)
    add_executable(test test.c)
    target_include_directories(test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/sdk_release/inc)
    target_link_libraries(test ${CMAKE_CURRENT_SOURCE_DIR}/sdk_release/lib/weila_sdk.a middle curl SDL2 pthread rt ncurses)    
else()

endif()
